package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TbDeptDutyId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbDeptDutyId implements java.io.Serializable {

	// Fields

	private Integer dpId;
	private String dpName;
	private String dpDescrible;
	private Integer corpId;

	// Constructors

	/** default constructor */
	public TbDeptDutyId() {
	}

	/** minimal constructor */
	public TbDeptDutyId(Integer corpId) {
		this.corpId = corpId;
	}

	/** full constructor */
	public TbDeptDutyId(Integer dpId, String dpName, String dpDescrible,
			Integer corpId) {
		this.dpId = dpId;
		this.dpName = dpName;
		this.dpDescrible = dpDescrible;
		this.corpId = corpId;
	}

	// Property accessors

	@Column(name = "dp_id")
	public Integer getDpId() {
		return this.dpId;
	}

	public void setDpId(Integer dpId) {
		this.dpId = dpId;
	}

	@Column(name = "dp_name", length = 20)
	public String getDpName() {
		return this.dpName;
	}

	public void setDpName(String dpName) {
		this.dpName = dpName;
	}

	@Column(name = "dp_describle", length = 20)
	public String getDpDescrible() {
		return this.dpDescrible;
	}

	public void setDpDescrible(String dpDescrible) {
		this.dpDescrible = dpDescrible;
	}

	@Column(name = "corp_id", nullable = false)
	public Integer getCorpId() {
		return this.corpId;
	}

	public void setCorpId(Integer corpId) {
		this.corpId = corpId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbDeptDutyId))
			return false;
		TbDeptDutyId castOther = (TbDeptDutyId) other;

		return ((this.getDpId() == castOther.getDpId()) || (this.getDpId() != null
				&& castOther.getDpId() != null && this.getDpId().equals(
				castOther.getDpId())))
				&& ((this.getDpName() == castOther.getDpName()) || (this
						.getDpName() != null && castOther.getDpName() != null && this
						.getDpName().equals(castOther.getDpName())))
				&& ((this.getDpDescrible() == castOther.getDpDescrible()) || (this
						.getDpDescrible() != null
						&& castOther.getDpDescrible() != null && this
						.getDpDescrible().equals(castOther.getDpDescrible())))
				&& ((this.getCorpId() == castOther.getCorpId()) || (this
						.getCorpId() != null && castOther.getCorpId() != null && this
						.getCorpId().equals(castOther.getCorpId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getDpId() == null ? 0 : this.getDpId().hashCode());
		result = 37 * result
				+ (getDpName() == null ? 0 : this.getDpName().hashCode());
		result = 37
				* result
				+ (getDpDescrible() == null ? 0 : this.getDpDescrible()
						.hashCode());
		result = 37 * result
				+ (getCorpId() == null ? 0 : this.getCorpId().hashCode());
		return result;
	}

}